# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.ClaimDeviceRequest do
  @moduledoc """
  Request message to claim a device on behalf of a customer.

  ## Attributes

  *   `configurationId` (*type:* `String.t`, *default:* `nil`) - Optional. The ID of the configuration applied to the device section.
  *   `customerId` (*type:* `String.t`, *default:* `nil`) - The ID of the customer for whom the device is being claimed.
  *   `deviceIdentifier` (*type:* `GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier.t`, *default:* `nil`) - Required. Required. The device identifier of the device to claim.
  *   `deviceMetadata` (*type:* `GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceMetadata.t`, *default:* `nil`) - Optional. The metadata to attach to the device.
  *   `googleWorkspaceCustomerId` (*type:* `String.t`, *default:* `nil`) - The Google Workspace customer ID.
  *   `preProvisioningToken` (*type:* `String.t`, *default:* `nil`) - Optional. Must and can only be set for Chrome OS devices.
  *   `sectionType` (*type:* `String.t`, *default:* `nil`) - Required. The section type of the device's provisioning record.
  *   `simlockProfileId` (*type:* `String.t`, *default:* `nil`) - Optional. Must and can only be set when DeviceProvisioningSectionType is SECTION_TYPE_SIM_LOCK. The unique identifier of the SimLock profile.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :configurationId => String.t() | nil,
          :customerId => String.t() | nil,
          :deviceIdentifier =>
            GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier.t() | nil,
          :deviceMetadata =>
            GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceMetadata.t() | nil,
          :googleWorkspaceCustomerId => String.t() | nil,
          :preProvisioningToken => String.t() | nil,
          :sectionType => String.t() | nil,
          :simlockProfileId => String.t() | nil
        }

  field(:configurationId)
  field(:customerId)
  field(:deviceIdentifier, as: GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier)
  field(:deviceMetadata, as: GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceMetadata)
  field(:googleWorkspaceCustomerId)
  field(:preProvisioningToken)
  field(:sectionType)
  field(:simlockProfileId)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidDeviceProvisioning.V1.Model.ClaimDeviceRequest do
  def decode(value, options) do
    GoogleApi.AndroidDeviceProvisioning.V1.Model.ClaimDeviceRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AndroidDeviceProvisioning.V1.Model.ClaimDeviceRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
